package org.particlethink.response;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class BillDownloadResponse {
    private String projectName;
    private String supplierName;
    private String startAt;
    private String endAt;
    private Float deductionAmount; //扣款金额
    private String deductionReason;// 扣款事由
    private Float rewardAmount; //  奖励金额
    private String rewardReason;//  奖励事由

    private List<BillDownloadMaterialResponse> materials;

    public BillDownloadResponse(
            String projectName,
            String supplierName,
            Date startAt,
            Date endAt,
            Float deductionAmount,
            String deductionReason,
            Float rewardAmount,
            String rewardReason,
            List<BillDownloadMaterialResponse> materials
    ) {
        this.projectName = projectName;
        this.supplierName = supplierName;
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");

        this.startAt = startAt == null ? "" : simpleDateFormat.format(startAt);
        this.endAt = endAt == null ? "" : simpleDateFormat.format(endAt);
        this.deductionAmount = deductionAmount;
        this.deductionReason = deductionReason;
        this.rewardAmount = rewardAmount;
        this.rewardReason = rewardReason;
        this.materials = materials;
    }


    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getStartAt() {
        return startAt;
    }

    public void setStartAt(String startAt) {
        this.startAt = startAt;
    }

    public String getEndAt() {
        return endAt;
    }

    public void setEndAt(String endAt) {
        this.endAt = endAt;
    }



    public String getDeductionReason() {
        return deductionReason;
    }

    public void setDeductionReason(String deductionReason) {
        this.deductionReason = deductionReason;
    }



    public String getRewardReason() {
        return rewardReason;
    }

    public void setRewardReason(String rewardReason) {
        this.rewardReason = rewardReason;
    }

    public List<BillDownloadMaterialResponse> getMaterials() {
        return materials;
    }

    public void setMaterials(List<BillDownloadMaterialResponse> materials) {
        this.materials = materials;
    }

    public Float getDeductionAmount() {
        return deductionAmount;
    }

    public void setDeductionAmount(Float deductionAmount) {
        this.deductionAmount = deductionAmount;
    }

    public Float getRewardAmount() {
        return rewardAmount;
    }

    public void setRewardAmount(Float rewardAmount) {
        this.rewardAmount = rewardAmount;
    }
}
